package com.enterprise.dao.impl;

import com.enterprise.dao.BaseDao;
import com.enterprise.dao.CustserviceDao;
import com.enterprise.entity.Custservice;
import com.enterprise.entity.page.PageModel;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;


@Repository("custserviceDao")
public class CustserviceDaoImpl implements CustserviceDao {
    @Resource
    private BaseDao dao;


    public void setDao(BaseDao dao) {
        this.dao = dao;
    }

    @Override
    public int insert(Custservice custservice) {
        return dao.insert("custservice.insert",custservice);
    }

    @Override
    public int delete(Custservice custservice) {
        return dao.delete("custservice.delete",custservice);
    }

    @Override
    public int update(Custservice custservice) {
        return dao.update("custservice.update",custservice);
    }

    @Override
    public Custservice selectOne(Custservice custservice) {
        return (Custservice) dao.selectOne("custservice.selectOne",custservice);
    }

    @Override
    public PageModel selectPageList(Custservice custservice) {
        return dao.selectPageList("custservice.selectPageList","custservice.selectPageCount",custservice);
    }

    @Override
    public List<Custservice> selectList(Custservice custservice) {
        return dao.selectList("custservice.selectList",custservice);
    }

    @Override
    public int deleteById(int id) {
        return dao.delete("custservice.deleteById",id);
    }

    @Override
    public Custservice selectById(int id) {
        return (Custservice) dao.selectOne("custservice.selectById",id);
    }
}
